home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs55.d81
/
mathtchr.prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-10-10
|
7KB
|
209 lines
1 REM *** THE MATH TUTOR AND TESTOR ***:
2 REM *** WRITTEN BY *** :
3 REM *** CARL M. LOCKMAN *** :
4 REM *** FLUSHING N.Y. *** :
5 REM *** FEBRUARY 1988 *** :
6 REM *** SEND E-MAIL TO SUPERTECH3 ***:
9 GOSUB40500
10 REM ADDITION TEST 100-180
11 REM SUBTRACTION TEST 200-280
12 REM MULTIPLICATION TEST 300-380
13 REM DIVISION TEST 400-480
20 PRINT"[147]":POKE53281,15:POKE53280,12
25 PRINTTAB(5)" CARL LOCKMAN'S MATH TEACHER [146]"
26 PRINTTAB(5)" CHOOSE THE MATH TUTOR OR TEST"
27 PRINTTAB(5)" YOU WOULD LIKE TO RUN"
28 PRINTTAB(5)"[158] TUTOR TEST
29 [153][163]5)"SYS USRUSRUSRUSRUSR USRUSRUSRUSR
30 PRINTTAB(2)"[158] 1- ADDITION 5- ADDITION"
31 PRINTTAB(2)"[158] 2- SUBTRACTION 6- SUBTRACTION"
32 PRINTTAB(2)"[158] 3- MULTIPLICATION 7- MULTIPLICATION"
33 PRINTTAB(2)"[158] 4- DIVISION 8- DIVISION"
34 PRINTTAB(7)"ENTER ONE NUMBER 1 - 8"
50 GETZZ$:IFZZ$=""THEN50
51 IFZZ$="1"THEN9000
52 IFZZ$="2"THEN9500
53 IFZZ$="3"THEN10000
54 IFZZ$="4"THEN10500
55 IFZZ$="5"THEN100
56 IFZZ$="6"THEN200
57 IFZZ$="7"THEN300
58 IFZZ$="8"THEN400
100 REM ADDITION TEST 100-180
105 INPUT"ENTER LARGEST NUMBER IN PROBLEMS";LA
106 C=0
110 A1=INT(LA*RND(1))+1
120 A2=INT(LA*RND(1))+1
130 PRINTCHR$(147):POKE53281,15:POKE53280,11
132 QN=QN+1:IFQN<=100THEN135
135 PRINTTAB(11)"[144]QUESTION # "QN
140 PRINT" CORRECT [146] "C"[150] INCORRECT [146] "I
145 PRINTTAB(10)"HOW MUCH IS "A1"+"A2
150 RE=(A1+A2)
155 PRINT
160 INPUT"WHAT'S THE ANSWER";ES
165 IFES=RETHENPRINT:PRINT" RIGHT [146]":F=0:GOTO5005
170 PRINT"";:PRINT"[150] WRONG [146]"
175 PRINT" THE CORRECT ANSWER IS "RE
180 GOTO6005
200 REM SUBTRACTION TEST 200-280
205 INPUT"ENTER LARGEST NUMBER IN PROBLEMS";LS
206 C=0:I=0:TQ=0
210 S1=INT(LS*RND(1))+1
220 S2=INT(LS*RND(1))+1
230 PRINTCHR$(147):POKE53281,15:POKE53280,11
232 QN=QN+1:IFQN<=100THEN235
235 PRINTTAB(11)"[144]QUESTION # "QN
240 PRINT" CORRECT [146] "C"[150] INCORRECT [146] "I
245 PRINTTAB(10)"HOW MUCH IS "S1"-"S2
250 RE=(S1-S2)
255 PRINT
260 INPUT"WHAT'S THE ANSWER";ES
265 IFES=RETHENPRINT:PRINT" RIGHT [146]":F=0:GOTO5005
270 PRINT"";:PRINT"[150] WRONG [146]"
275 PRINT" THE CORRECT ANSWER IS "RE
280 GOTO6005
300 REM MULTIPLICATION TEST 300-380
305 INPUT"ENTER LARGEST NUMBER IN PROBLEMS";LM
306 C=0:I=0:TQ=0
310 M1=INT(LM*RND(1))+1
320 M2=INT(LM*RND(1))+1
330 PRINTCHR$(147):POKE53281,15:POKE53280,11
332 QN=QN+1:IFQN<=100THEN335
335 PRINTTAB(11)"[144]QUESTION # "QN
340 PRINT" CORRECT [146] "C"[150] INCORRECT [146] "I
345 PRINTTAB(10)"HOW MUCH IS "M1"X"M2
350 RE=(M1*M2)
355 PRINT
360 INPUT"WHAT'S THE ANSWER";ES
365 IFES=RETHENPRINT:PRINT" RIGHT [146]":GOTO5005
370 PRINT"";:PRINT"[150] WRONG [146]"
375 PRINT" THE CORRECT ANSWER IS "RE
380 GOTO6005
400 REM DIVISION TEST 400-480
405 INPUT"ENTER LARGEST NUMBER IN PROBLEMS";LD
406 C=0:I=0:TQ=0
410 D1=INT(LD*RND(1))+1
420 D2=INT(LD*RND(1))+1
430 PRINTCHR$(147):POKE53281,15:POKE53280,11
432 QN=QN+1:IFQN<=100THEN435
435 PRINTTAB(11)"[144]QUESTION # "QN
440 PRINT" CORRECT [146] "C"[150] INCORRECT [146] "I
445 PRINTTAB(10)"HOW MUCH IS "D1"/"D2
450 RE=(D1/D2)
455 PRINT
460 INPUT"WHAT'S THE ANSWER";ES
465 IFES=RETHENPRINT:PRINT" RIGHT [146]":GOTO5005
470 PRINT"";:PRINT"[150] WRONG [146]"
475 PRINT" THE CORRECT ANSWER IS "RE
480 GOTO6005
4900 PRINT" CORRECT [146] "C"[150] INCORRECT [146] "I:RETURN
5005 C=C+1:IFC<=25THENGOSUB4900
5006 GOTO8000
6005 I=I+1:IFI<=25THENGOSUB4900
6006 GOTO8000
7000 PRINT"[147]":POKE53281,0:POKE53280,0
7005 TQ=C+I:PC=C/TQ*100
7010 PRINT" YOUR FINAL SCORE
7011 [153]"SYS OUT OF "TQ"SYS QUESTIONS YOU HAVE"
7020 [153]" "C" RIGHT WAIT "I"DEF WRONG WAIT "
7030 [153]" THAT IS A SCORE OF "PC "%"
7039 [153]" WAIT"
7040 [153]" PRESS (M) FOR MAIN MENU WAIT"
7044 [153]" PRESS (E) TO END PROGRAM WAIT"
7045 [153]" WAIT"
7050 [161]ED$:[139]ED$[178]""[167]7050
7055 [139]ED$[178]"M"[167]10
7066 [139]ED$[178]"E"[167][153]"CONTLOAD":[151]53281,6:[151]53280,14:[128]
8000 [153][163]9)"ANOTHER PROBLEM Y OR N"
8005 [161]ED$:[139]ED$[178]""[167]8005
8008 [139]ED$[178]"Y"[167]8080
8010 [139]ED$[178]"N"[167]7000
8080 [139]ZZ$[178]"5"[167]110
8081 [139]ZZ$[178]"6"[167]210
8082 [139]ZZ$[178]"7"[167]310
8083 [139]ZZ$[178]"8"[167]410
9000 [153]"LOAD":[151]53281,12:[151]53280,0
9010 [153]" CARL LOCKMAN'S MATH TEACHER WAIT"
9020 [153]"SYS ADDITION TUTOR WAIT"
9022 [153]"SYS A + B = C
9030 PRINT" ENTER 2 NUMBERS THEN PRESS RETURN"
9040 INPUT"[144] ENTER A=";A
9041 INPUT"[145] ENTER B=";B
9050 C=A+B:PRINT" "A" + "B" = "C
9060 PRINT" [146]"
9061 PRINT" ANOTHER PROBLEM ? [146]"
9062 PRINT" [146]"
9063 PRINT" PRESS Y OR N [146]"
9064 PRINT" [146]"
9065 PRINT" PRESS (M) FOR MAIN MENU [146]"
9066 PRINT" [146]"
9070 GETED$:IFED$=""THEN9070
9075 IFED$="Y"THEN9100
9080 IFED$="N"THENPRINT"[147][154]":POKE53281,6:POKE53280,14:END
9085 IFED$="M"THEN10
9100 IFZZ$="1"THEN9000
9110 IFZZ$="2"THEN9500
9120 IFZZ$="3"THEN10000
9130 IFZZ$="4"THEN10500
9500 PRINT"[147]":POKE53281,12:POKE53280,0
9510 PRINT" CARL LOCKMAN'S MATH TEACHER [146]"
9520 PRINT"[158] SUBTRACTION TUTOR [146]"
9522 PRINT"[158] A - B = C
9530 [153]" ENTER 2 NUMBERS THEN PRESS RETURN"
9540 [133]"STOP ENTER A=";A
9541 [133]"ON ENTER B=";B
9550 C[178]A[171]B:[153]" "A" - "B" = "C
9560 [137]9060
10000 [153]"LOAD":[151]53281,12:[151]53280,0
10010 [153]" CARL LOCKMAN'S MATH TEACHER WAIT"
10020 [153]"SYS MULTIPLICATION TUTOR WAIT"
10022 [153]"SYS A X B = C
10030 PRINT" ENTER 2 NUMBERS THEN PRESS RETURN"
10040 INPUT"[144] ENTER A=";A
10041 INPUT"[145] ENTER B=";B
10050 C=A*B:PRINT" "A" X "B" = "C
10060 GOTO9060
10500 PRINT"[147]":POKE53281,12:POKE53280,0
10510 PRINT" CARL LOCKMAN'S MATH TEACHER [146]"
10520 PRINT"[158] DIVISION TUTOR [146]"
10521 PRINT"[129] NOTE: / = DIVIDED BY
10522 [153]"SYS A / B = C
10530 PRINT" ENTER 2 NUMBERS THEN PRESS RETURN"
10540 INPUT"[144] ENTER A=";A
10541 INPUT"[145] ENTER B=";B
10550 C=A/B:PRINT" "A" / "B" = "C
10560 GOTO9060
40500 PRINT"[147]":POKE53281,0:POKE53280,0
40510 FORX=1TO25:CUR$=CUR$+CHR$(17):NEXTX
40790 VT=3:B$="[152] ":GOSUB50060
40800 VT=4:B$="[152] [166][166] [166][166] [166][166][166][166] [166][166][166][166][166] [166] [166] ":GOSUB50060
40810 VT=5:B$="[152] [166] [166] [166] [166] [166] [166] [166] [166] [166] ":GOSUB50060
40820 VT=6:B$="[152] [166] [166] [166] [166][166][166][166][166][166] [166] [166][166][166][166][166] ":GOSUB50060
40830 VT=7:B$="[152] [166] [166] [166] [166] [166] [166] [166] ":GOSUB50060
40840 VT=8:B$="[152] [166] [166] [166] [166] [166] [166] [166] ":GOSUB50060
40841 VT=9:B$="[152] ":GOSUB50060
40849 VT=16:B$="[152] ":GOSUB50060
40850 VT=17:B$="[152] [166][166][166][166][166] [166][166][166][166] [166][166][166][166] [166][166][166][166] [166] [166] [166][166][166][166] [166][166][166][166] ":GOSUB50060
40860 VT=18:B$="[152] [166] [166] [166] [166] [166] [166] [166] [166] [166] [166] ":GOSUB50060
40870 VT=19:B$="[152] [166] [166][166][166][166] [166][166][166][166] [166] [166][166][166][166] [166][166][166] [166][166][166][166] ":GOSUB50060
40880 VT=20:B$="[152] [166] [166] [166] [166] [166] [166] [166] [166] [166] [166] ":GOSUB50060
40890 VT=21:B$="[152] [166] [166][166][166][166] [166] [166] [166][166][166][166] [166] [166] [166][166][166][166] [166] [166] ":GOSUB50060
40891 VT=22:B$="[152] ":GOSUB50060
40900 VT=12:B$=" 2+2=4 5-3=2 5X5=25 25/5=5 ":GOSUB50060
40910 VT=13:B$="[158] 6+6=12 9-3=6 3X3=9 15/5=3 ":GOSUB50060
40920 VT=14:B$=" 9+7=16 8-6=2 3X9=27 21/3=7 ":GOSUB50060
40930 T=T+1:IFT<=3THEN40900
40940 VT=12:B$=" ":GOSUB50060
40950 VT=13:B$=" WRITTEN BY CARL M. LOCKMAN ":GOSUB50060
40960 VT=14:B$=" ":GOSUB50060
40970 FORT=1TO2500:NEXT:RETURN
50060 REM FROM CENTER LINE
50070 M=LEN(B$)
50080 IFM/2<>INT(M/2)THENB$=B$+" ":M=M+1
50090 FORN=1TOM/2
50100 PRINTCHR$(19);LEFT$(CUR$,VT-1);
50110 PRINTSPC(21-N)LEFT$(B$,N);RIGHT$(B$,N);
50120 NEXTN
50130 RETURN